import request from '@/utils/request'
import type { PageParam, ResponseData } from '../commonType'

enum API {
  PAGE_URL = '/sys/log/getPage',
  EXPORT_URL = '/sys/log/exportXls',
}

export function logGetPage(data: PageParam) {
  return request.get<any, ResponseData>(API.PAGE_URL, { params: data })
}

export function exportLog(data: any) {
  return request.get<any, ResponseData>(API.EXPORT_URL, {
    params: data,
    responseType: 'blob',
  })
}
